package gateway

import (
	"context"
	"fmt"

	v1 "code.byted.org/bytertc/whiteboard_server/biz/api/pb/v1"

	"code.byted.org/bytertc/whiteboard_server/biz/pkg/gateway"
)

func NewRtcApi() *rtcApi {
	return &rtcApi{}
}

type rtcApi struct {
}

func (r *rtcApi) ToUser(ctx context.Context, appID, roomID, userID, message, tag string, p2pType *v1.OnWireRequest_RtsP2PType) (error, string) {
	fmt.Printf("ToUser ->user:%s,message:%s,tag:%s\n", userID, message, tag)
	return nil, ""
}
func (r *rtcApi) ToRoom(ctx context.Context, appID, roomID, message, tag string) (error, string) {
	fmt.Printf("ToRoom ->roomID:%s,message:%s,tag:%s\n", roomID, message, tag)
	return nil, ""
}
func (r *rtcApi) StartWebCast(ctx context.Context, params *gateway.StartWebCastParams) (err error) {
	fmt.Printf("StartWebCast ->appID:%s,taskId:%s,url:%s\n", params.AppId, params.TaskId, params.SourceURL)
	return nil
}
func (r *rtcApi) StopWebCast(ctx context.Context, params *gateway.StopWebCastParams) (err error) {
	fmt.Printf("StopWebCast ->appID:%s,taskId:%s\n", params.AppId, params.TaskId)
	return nil
}
func (r *rtcApi) StartRecord(ctx context.Context, params *gateway.StartRecordParams) (err error) {
	fmt.Printf("StartRecord ->appID:%s,taskId:%s\n", params.AppId, params.TaskId)
	return nil
}
func (r *rtcApi) StopRecord(ctx context.Context, params *gateway.StopRecordParams) (err error) {
	fmt.Printf("StopRecord ->appID:%s,taskId:%s\n", params.AppId, params.TaskId)
	return nil
}
func (r *rtcApi) GetAccountID(ctx context.Context, appID string) (string, error) {
	return "", nil
}
func (r *rtcApi) GenByteToken(ctx context.Context, appID, roomID, userID string) (token string, err error) {
	return "", nil
}
